<%--
  @desc: 投诉意见列表
  @author: chenw
  @create: 2014-4-29 下午 15:32
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

   <div class="pageHeader">
    <form rel="pageForm" onsubmit="return navTabSearch(this);"
            action="<c:url value='/sys/login/list'/>" method="post">
        <div class="searchBar">
            <ul>
                
                <li style="float: left; line-height: 25px;">
                    <label>登陆时间：</label>
                    <input name="start" type="text" id="start"
                            class="date" datefmt="yyyy-MM-dd HH:mm:ss"
                            value="<fmt:formatDate value="${query.start}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                            placeholder="起始时间"
                            style="width: 100px; font-family: '微软雅黑 sans-serif serif';"/> - <input id="end"
                        name="end" type="text" class="date" datefmt="yyyy-MM-dd HH:mm:ss"
                        value="<fmt:formatDate value="${query.end}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                        placeholder="结束时间"
                        style="width: 100px; font-family: '微软雅黑 sans-serif serif';"/></li>
                        <li style="float: left; line-height: 25px;">
                    <label>登陆账号：</label> <input name="loginId" type="text" id="loginId"  value="${query.loginId}" placeholder="请输入登陆账号"
                        style="width: 150px; font-family: '微软雅黑 sans-serif serif';"/>
                </li>
                <li style="float: left; line-height: 25px;">
                    <label>用户类型：</label> <select name="userSrc">
                    <option value="" selected="selected">全部</option>
                    <option value="1"
                            <c:if test="${query.userSrc==1}">selected="selected"</c:if>>app注册用户
                    </option>
                    <option value="2"
                            <c:if test="${query.userSrc==2}">selected="selected"</c:if>>网厅注册用户
                    </option>
                 
                </select></li>
                 
         
                <li>
                    <div class="buttonActive" style="margin-left: 5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
                 <li>
				<div class="buttonActive" style="margin-left: 5px;">
					<div class="buttonContent">
						<button type="button" onclick="exportExcel()">导出</button>
					</div>
				</div>
			</li>
            </ul>
        </div>
    </form>
</div>
    <div class="pageContent" style="padding-top: 1px;">
    <table class="table"  width="100%" layoutH="115">
        <thead>
        <tr>
            <th width="5%" align="center">序号</th>
       
            <th width="10%" align="center">登陆账号</th>
            <th width="15%" align="center">登陆时间</th>
      
          
        </tr>
        </thead>
        <tbody>
        <c:forEach var="login" items="${pager.list}" varStatus="vs">
            <tr target="sel_id" nowrapTD="false" rel="${login.id}">
                <td>${vs.count+(pager.pageNum-1)*pager.numPerPage}</td>
          
                <td>${login.loginId}</td>
                <td><fmt:formatDate value="${login.loginTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            
               
                
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span>
            <select id="cob_ps" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.numPerPage}"
             pageNumShown="10"
             currentPage="${pager.pageNum}"></div>
    </div>
    <form id="pagerForm" method="post" action="<c:url value='/sys/login/list'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/>
        <input type="hidden" name="keywords" value="${query.keywords}"/>
        <input
            type="hidden" name="end"
            value="<fmt:formatDate value="${query.end}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
	<input
            type="hidden" name="start"
            value="<fmt:formatDate value="${query.start}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
        <input type="hidden" name="loginId" value="${query.loginId}"/>
        <input type="hidden" name="userSrc" value="${query.userSrc}"/>
    </form>
    
    
    
<!--     <iframe src="" id="downframe" name="downframe" width=800 height=500></iframe><br> -->
<!-- <input type=button value="click" onclick="iframe.location='http://www.baidu.com'"/> -->
    
    
</div>
<script type="text/javascript">
	function exportExcel() {
		var end=$("#end").val();
		var start=$("#start").val();
		var loginId=$("#loginId").val();
		
		window.location.href = "${pageContext.request.contextPath }/sys/login/exportExcel.xls?end="+end+"&start="+start+"&loginId="+
				loginId+"&userSrc=${query.userSrc}"
		
		
		//var a=
		//location.href = '<c:url value="/sys/login/exportExcel.xls?end1=&start=&loginId=${query.loginId}&userSrc=${query.userSrc}"/>';
		/* pagerForm.target = downframe;
		pagerForm.submit(); */
	}
</script>